package com.vogue.supplymall.order.domain.dao.impl;

import com.vogue.supplymall.order.domain.dao.FulfillmentDao;
import com.vogue.supplymall.order.domain.mapper.FulfillmentMapper;
import com.vogue.supplymall.order.domain.model.Fulfillment;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

/**
 * The type Fulfillment dao.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-02-05
 */
@Repository("fulfillmentDao")
public class FulfillmentDaoImpl extends BaseDaoImpl<Fulfillment, Long> implements FulfillmentDao {
    @Resource
    private FulfillmentMapper fulfillmentMapper;

    @Override
    public Integer getFulfillmentForRefund(Long refundId) {
    	Map<String, Object> map = new HashMap<String,Object>();
    	map.put("refundId", refundId);
    	return (int)fulfillmentMapper.selectWhrCount0("orderid = #{refundId}", Fulfillment.class, map);
//        return fulfillmentMapper.getFulfillmentForRefund(refundId);
    }
}
